package com.example.demo.copy;

/**
 * 自己写的get set方法进行复制拷贝
 */
public class SelfGetSetCopyService extends AbstractCopyService {
    @Override
    public void copy(Object dest1, Object orig1) {
        HotelCtrip dest = (HotelCtrip) dest1;
        HotelElong orig = (HotelElong) orig1;
        dest.setHotelId(orig.getHotelId());
        dest.setHotelName(orig.getHotelName());
        Room room = new Room();
        room.setRoomId(orig.getRoom().getRoomId());
        room.setRoomName(orig.getRoom().getRoomName());
        dest.setRoom(room);
    }
}